package wdt_qf.entity.request;

import com.qimencloud.api.scenehu3cgwt0tc.response.WdtStockPdQueryTradeResponse;
import com.qimencloud.api.scenehu3cgwt0tc.response.WdtStockoutOrderQueryTradeResponse;
import com.taobao.api.ApiRuleException;
import com.taobao.api.BaseTaobaoRequest;
import com.taobao.api.Constants;
import com.taobao.api.internal.util.RequestCheckUtils;
import com.taobao.api.internal.util.TaobaoHashMap;

import java.util.Map;

/**
 * TOP API(QimenCloud): wdt.stockout.order.query.trade request
 *
 * @author top auto create
 * @since 1.0, 2018.08.20
 */
public class WdtPdQueryTradeRequest extends BaseTaobaoRequest<WdtStockPdQueryTradeResponse> {


    /**
     * 秘钥
     */
    private String appkey;

    /**
     * 结束日期
     */
    private String endTime;

    /**
     * 页号,默认0，从0页开始。
     */
    private Long pageNo;

    /**
     * 分页大小（最大不超过30条，默认返回30条）
     */
    private Long pageSize;

    /**
     * 卖家账号
     */
    private String sid;

    /**
     * 开始日期
     */
    private String startTime;

    /**
     * 状态，55已审核,5,已取消 (此参数查询时间为最后更新时间)，不传此参数默认按出库时间查询，已发货已完成单据。
     */
    private Long status;

    /**
     * 仓库编号
     */
    private String warehouseNo;

    /**
     * 系统订单号
     */
    private String srcOrderNo;

    /**
     * 原始单号
     */
    private String srcTid;

    /**
     * 出库单号
     */
    private String stockoutNo;

    public void setAppkey(String appkey) {
        this.appkey = appkey;
    }

    public String getAppkey() {
        return this.appkey;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getEndTime() {
        return this.endTime;
    }

    public void setPageNo(Long pageNo) {
        this.pageNo = pageNo;
    }

    public Long getPageNo() {
        return this.pageNo;
    }

    public void setPageSize(Long pageSize) {
        this.pageSize = pageSize;
    }

    public Long getPageSize() {
        return this.pageSize;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public String getSid() {
        return this.sid;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getStartTime() {
        return this.startTime;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    public Long getStatus() {
        return this.status;
    }

    public void setWarehouseNo(String warehouseNo) {
        this.warehouseNo = warehouseNo;
    }

    public String getWarehouseNo() {
        return this.warehouseNo;
    }

    public String getApiMethodName() {
        return "wdt.stock.pd.order.query";
    }

    private String topContentType;

    public String getTopContentType() {
        return topContentType;
    }

    public void setTopContentType(String topContentType) {
        this.topContentType = topContentType;
    }

    private String topResponseType = Constants.RESPONSE_TYPE_QIMEN;

    public String getTopResponseType() {
        return topResponseType;
    }

    public void setTopResponseType(String topResponseType) {
        this.topResponseType = topResponseType;
    }

    private String topApiVersion = "2.0";

    public String getTopApiVersion() {
        return this.topApiVersion;
    }

    public void setTopApiVersion(String topApiVersion) {
        this.topApiVersion = topApiVersion;
    }

    private String topApiFormat;

    public String getTopApiFormat() {
        return this.topApiFormat;
    }

    public void setTopApiFormat(String topApiFormat) {
        this.topApiFormat = topApiFormat;
    }

    public Map<String, String> getTextParams() {
        TaobaoHashMap txtParams = new TaobaoHashMap();
        txtParams.put("appkey", this.appkey);
        txtParams.put("end_time", this.endTime);
        txtParams.put("page_no", this.pageNo);
        txtParams.put("page_size", this.pageSize);
        txtParams.put("sid", this.sid);
        txtParams.put("start_time", this.startTime);
        txtParams.put("status", this.status);
        txtParams.put("warehouse_no", this.warehouseNo);
        if (this.udfParams != null) {
            txtParams.putAll(this.udfParams);
        }
        return txtParams;
    }

    public Class<WdtStockPdQueryTradeResponse> getResponseClass() {
        return WdtStockPdQueryTradeResponse.class;
    }

    public void check() throws ApiRuleException {
        //RequestCheckUtils.checkNotEmpty(endTime, "endTime");
        RequestCheckUtils.checkNotEmpty(sid, "sid");
        //RequestCheckUtils.checkNotEmpty(startTime, "startTime");
    }

    public String getSrcOrderNo() {
        return srcOrderNo;
    }

    public void setSrcOrderNo(String srcOrderNo) {
        this.srcOrderNo = srcOrderNo;
    }

    public String getSrcTid() {
        return srcTid;
    }

    public void setSrcTid(String srcTid) {
        this.srcTid = srcTid;
    }

    public String getStockoutNo() {
        return stockoutNo;
    }

    public void setStockoutNo(String stockoutNo) {
        this.stockoutNo = stockoutNo;
    }


}